The invention relates to a method for on-line monitoring the behavior of middleware based, distributed application software during run-time of the latter software. The invention further relates to a method for on-line testing the behavior of middleware based, distributed application software during run-time of the latter software.
There is the need to perform monitoring and testing in several fields of applied technical environments, such as communications, in particular telecommunications, automation, and databases.
In the past, solutions for testing and monitoring were based purely on as the intellectual capacities of the developers and their ability to avoid and correct bugs. This ability was developed via experience. The time devoted to test, the complexity of the computer system, the heterogeneity of the architectures and system do not permit today to proceed as in the past.
With the coexistence of software (old and new versions, components from different retailers), there is also a need for continuous monitoring and testing of the behavior of a software.
A first aim of the invention is therefore to provide a method for on-line monitoring the behavior of middleware based, distributed application software during run-time thereof.
A second aim of the invention is to provide a method for on-line testing the behavior of middleware based, distributed application software during run-time thereof. According to the invention the first aim indicated above is achieved by a monitoring method comprising:
(a) defining events capturing the behavior of the software execution, said events being based on an abstraction of the application software, said abstraction being provided by said middleware,
(b) using code generating means and an instrumentation technique for automatically adding to the implementation of the software code suitable for generating traces suitable to be sent to an observer, the information carried by said added code including information on the order of occurrence of said events and on the software part location where each event occurs, and
(c) using a monitoring mechanism based on sending of trace reports to said observer which ensures or takes into account the time order of the reported traces.
In order to achieve the above objects, there is provided a method for spying on the distributed application, where the spying is performed on events occurring in the system, where a trace report of the detection of these events is sent to an Observer.
According to the invention the second aim indicated above is achieved by a testing method comprising:
(a) monitoring the behavior of said software during run-time thereof by means of a method according to the invention, and
(b) using a checking mechanism for checking whether said behavior is violating or has violated properties or constraints, said properties or constraints being dynamically defined at runtime by the user,
(c) expressing properties by the mean of the events that can be observed when the software application is running.
The main advantages of the methods according to the present invention include the following:
The instrumentation providing traces of relevant events is effected automatically.
The methods are independent of a choice of implementation language.
The methods make possible the monitoring and testing of an implementation still being developed or a final version thereof.
It is not necessary to specify the behavior of the entire system.
It is possible to focus the monitoring and testing only on specific part/behavior of the system
The methods are easy to use, even for a user not familiar with formal methods.
It is possible to configure the monitoring and testing dynamically at runtime.
Preferred embodiments of a monitoring method according to the invention comprise one or more of the following features:
Events capturing the behavior of the software execution, running on top of a middleware, are defined.
The defined events are generic for middleware softwares.
The defined events to be observed are selectable, and they are in particular selectable at run-time of the software being monitored, so that the set of events that can be monitored is dynamically configurable during said runtime.
The defined events are directly identifiable by the abstraction thereof provided by the middleware or by the interface definition language used, so that no other specification thereof in a different language is necessary.
The monitoring mechanism according to the invention is based on the sending of trace reports to a central or distributed observer.
The order of the reported traces is ensured.
The traces can be displayed in a graphical user interface and can also be stored, e.g. for post processing.
The monitoring method according to the invention makes use of an instrumentation technique that automatically adds code to the implementation of the distributed application software being tested, said code being such that traces of predefined events are sent to the observer. Since the latter instrumentation is performed automatically, there is no need of manual intervention of the user for this purpose.
The traces sent to the observer are preferably transmitted asynchronously,
displayed by means of a graphical user interface, the traces being represented by a time line, a table or a graph, and stored in a memory for post-processing.
The order of the reported events is reconstructed e.g. either by a logical clock system, a synchronization protocol, or the distributed processing environment.
Preferred embodiments of a testing method according to the invention comprise one or more of the following features:
Properties or constraints are expressed with events by means of a formal language, the expression of said properties or constraints being automatically translated into Finite State Machines or oracle, or some means derived therefrom.
The formal language allows the specification of temporal relations.
The formal language allows the specification of relations between events of same or different types, e.g. application events, error events and/or other events of interest for monitoring purposes (e.g. breakpoints), said events being directly identifiable by the abstraction thereof provided by the middleware or by the interface definition language used, and said events being selectable at run-time of the software being monitored.
The formal language allows the specification of procedural dependencies.
Properties are expressed independently from the implementation language at any of the following levels of granularity, at the level of: threads, a single object, a set of objects, the entire system, a variable of an object, an interface, a method.